Trouble with QxtGlobalShortcut [solved]
Posted
by Ockonal
on Stack Overflow
See other posts from Stack Overflow
or by Ockonal
Published on 2009-06-27T11:39:17Z
Indexed on
2010/06/05
14:52 UTC
Read the original article
Hit count: 183
Hello, i'm trying to set global shortcut for my applcation using QxtGlobalShortcut. Here is my code:
QxtGlobalShortcut m_hotkeyHandle;
m_hotkeyHandle.setShortcut( QKeySequence("Ctrl+Shift+X") );
m_hotkeyHandle.setEnabled(true);
connect( &m_hotkeyHandle, SIGNAL(activated()),
this, SLOT(hotkeyPressed()) );
void MainWindow::hotkeyPressed()
{
QMessageBox::information(this, "Good", "Hot key triggered", "yes", "no");
}
But after applcation started i got:
QxtGlobalShortcut failed to register: "Ctrl+Shift+X"
And my programm doesn't activate after hot key pressing. What should i do?
EDIT:
There was a bug in Qxt-lib 0.5 with shortcut. I spoke with developer and knew that i just need to update library from dev-branch (0.5.1 is worked).
© Stack Overflow or respective owner